package com.hhkj.admin.order.mapper;

import com.hhkj.admin.order.domain.Order;
import com.hhkj.admin.order.model.dopo.OrderCountPo;
import com.hhkj.admin.order.model.dopo.OrderDo;
import com.hhkj.admin.order.model.dopo.OrderPo;
import com.ruoyi.common.base.biz.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

/**
 * @author admin
 */
public interface OrderMapper
        extends BaseMapper<Order, OrderDo, OrderPo> {

    /**
     * 获取listIncludeItem分页的orderId
     *
     * @param orderDo
     * @return
     */
    List<Long> listOrderIdByListIncludeItem(@Param("conditionDo") OrderDo orderDo);

    /**
     * 订单列表，包括子订单信息
     *
     * @param idList
     * @return
     */
    List<OrderPo> listIncludeItem(@Param("idList") List<Long> idList, @Param("conditionDo") OrderDo orderDo);

    /**
     * 根据销售id统计数据
     *
     * @param saleId 销售id
     * @return 订单统计信息
     */
    OrderCountPo countBySaleId(@Param("saleId") Long saleId);

}




